package com.zhijian.warehouse.manage.service;

import com.zhijian.warehouse.manage.entity.po.StoreStockRecord;
import com.zhijian.warehouse.manage.entity.vo.request.StoreStockRecordSearchVo;
import com.zhijian.warehouse.manage.entity.vo.request.StoreStockRecordSaveOrUpdateVo;
import com.zhijian.warehouse.manage.entity.vo.response.StoreStockRecordVo;
import com.zhijian.util.page.Page;

import java.util.List;

/**
 * 盘点记录 业务处理层
 *
 * @author auto
 * @version 1.0
 * @date 2024-10-27 13:46:26
 */
public interface StoreStockRecordService {

    /**
    * 主键查询
    *
    * @param id
    * @return
    */
    StoreStockRecord selectById(Long id);

    /**
    * 主键查询vo
    *
    * @param id
    * @return
    */
    StoreStockRecordVo selectVoById(Long id);

    /**
    * 按照主键删除
    *
    * @param id
    */
    void deleteById(Long id);

    /**
    * 按照主键批量删除
    *
    * @param idList
    */
    void deleteByIdList(List<Long> idList);

    /**
    * 新增
    *
    * @param storeStockRecord
    * @return
    */
    Long insert(StoreStockRecord storeStockRecord);

    /**
    * 动态新增
    *
    * @param storeStockRecord
    * @return
    */
    Long insertSelective(StoreStockRecord storeStockRecord);

    /**
    * 更改
    *
    * @param storeStockRecord
    * @return
    */
    boolean update(StoreStockRecord storeStockRecord);

    /**
    * 动态修改
    *
    * @param record
    * @return
    */
    boolean updateByPrimaryKeySelective(StoreStockRecord record);

    /**
    * 保存
    *
    * @param saveOrUpdateVo
    * @return
    */
    boolean save(StoreStockRecordSaveOrUpdateVo saveOrUpdateVo);

    /**
    * 编辑
    *
    * @param saveOrUpdateVo
    * @return
    */
    boolean modify(StoreStockRecordSaveOrUpdateVo saveOrUpdateVo);

    /**
    * 列表
    *
    * @param storeStockRecordSearchVo
    * @return
    */
    StoreStockRecordVo selectOne(StoreStockRecordSearchVo storeStockRecordSearchVo);

    /**
    * 总数
    *
    * @param storeStockRecordSearchVo
    * @return
    */
    Integer count(StoreStockRecordSearchVo storeStockRecordSearchVo);

    /**
    * 列表
    *
    * @param storeStockRecordSearchVo
    * @return
    */
    List<StoreStockRecordVo> selectList(StoreStockRecordSearchVo storeStockRecordSearchVo);

    /**
    * 分页查询
    *
    * @param storeStockRecordSearchVo
    * @return
    */
    Page<StoreStockRecordVo> selectPage(StoreStockRecordSearchVo storeStockRecordSearchVo);

    /**
    * 批量新增数据（MyBatis原生foreach方法）
    *
    * @param entities 实例对象列表
    * @return 影响行数
    */
    boolean insertBatch(List<StoreStockRecord> entities);


    String selectMaxNumber();

    String createNextNumber();

    /**
     * 提交盘点
     * @param param
     * @return
     */
    boolean submitStock(StoreStockRecordSaveOrUpdateVo param);

    /**
     * 提交审核
     * @param param
     * @return
     */
    boolean auditStock(StoreStockRecordSaveOrUpdateVo param);

    /**
     * 盘点完成
     * @param number
     * @return
     */
    StoreStockRecordVo selectVoByNumber(String number);

    /**
     * 盘盈亏单审核
     * @param param
     * @return
     */
    boolean monadAuditStock(StoreStockRecordSaveOrUpdateVo param, int sourceType);
}
